/*
 * Copyright (c) 2010 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package com.google.api.data.gdata.v2.model;

import com.google.api.client.util.Key;

/**
 * A postal address.
 * 
 * @since 2.2
 * @author Nicolas Garnier
 */
public class PostalAddress {

  public static final String REL_HOME = "http://schemas.google.com/g/2005#home";
  public static final String REL_WORK = "http://schemas.google.com/g/2005#work";
  /**
   * An address which is neither home nor work. label can be used to indicate
   * the actual type.
   */
  public static final String REL_OTHER = "http://schemas.google.com/g/2005#other";

  /**
   * The address as text. Leading and trailing whitespace is insignificant.
   * Newlines within the string are significant.
   */
  @Key("text()")
  public String address;

  /**
   * A programmatic value that identifies the type of postal address; see below
   * for details.
   */
  @Key("@rel")
  public String rel;

  /**
   * When multiple postal address extensions appear in a contact kind, indicates
   * which is primary. At most one postal address may be primary. Default value
   * is "false".
   */
  @Key("@primary")
  public Boolean primary;

  /**
   * A simple string value used to name this address.
   */
  @Key("@label")
  public String label;
}
